<?php
require("vendor/autoload.php");



$openapi = OpenApi\scan([__DIR__.'/app']);

//生成json, 可以用来对yapi的同步
file_put_contents(__DIR__.'/public/docs/openapi.json', $openapi->toJson());

//生成yaml
shell_exec("./vendor/bin/openapi ./app -o ./public/docs");
